package com.yuandian.api.management.feign;

import com.yuandian.api.customer_perception.po.BusinessAnalysisParams;
import com.yuandian.api.customer_perception.vo.BusinessStepAnalysisVo;
import com.yuandian.api.management.entity.ConfStep;
import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;
import java.util.Map;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteStepService", value = "bpm-management")
public interface RemoteStepService {

	/**
	 * 查询业务步骤类型
	 * @return 通用返回对象
	 */
	@GetMapping("/step/queryStepTypeByBusinessCode")
	R<Map<String,String>> queryStepTypeByBusinessCode();

	@GetMapping("/innerInterface/queryStepTypeByBusinessCode")
	R<Map<String,String>> queryStepTypeByBusinessCode(@RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 查询步骤
	 * @return 通用返回对象
	 */
	@PostMapping("/step/getStepBySystemIdOrStepCode")
	R<List<ConfStep>> getStepBySystemIdOrStepCode(ConfStep confStep);

	/**
	 * 查询步骤
	 * @return 通用返回对象
	 */
	@PostMapping("/step/getStepByBusinessCodes")
	R<List<ConfStep>> getStepByBusinessCodes(ConfStep confStep);

	/**
	 * 查询步骤对象
	 * @return 通用返回对象
	 */
	@PostMapping("/step/list")
	R<List<ConfStep>> list(ConfStep confStep);

	/**
	 * 查询系统id
	 * @return 通用返回对象
	 */
	@PostMapping("/step/querySystemIdByStepCode")
	R<List<String>> querySystemIdByStepCode(List<String> stepCodes);

	@PostMapping("/step/selectStepsByBusicessCode")
	R<List<BusinessStepAnalysisVo>> selectStepsByBusicessCode(@RequestBody BusinessAnalysisParams params);
}
